package com.shine.log.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shine.mybatis.entity.BaseEntity;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName(value = "request_log")
public class RequestLog extends BaseEntity {

    /**
     * 链路追踪ID
     */
    @TableField(value = "trace_id")
    private String traceId;

    /**
     * 服务名
     */
    @TableField(value = "service")
    private String service;

    /**
     * 请求ip
     */
    @TableField(value = "ip")
    private String ip;

    /**
     * uri
     */
    @TableField(value = "uri")
    private String uri;

    /**
     * path
     */
    @TableField(value = "path")
    private String path;

    /**
     * 请求时间
     */
    @TableField(value = "request_time")
    private LocalDateTime requestTime;

    /**
     * 请求方法
     */
    @TableField(value = "request_method")
    private String requestMethod;

    /**
     * 请求头
     */
    @TableField(value = "request_headers")
    private String requestHeaders;

    /**
     * 请求参数
     */
    @TableField(value = "request_params")
    private String requestParams;

    /**
     * 客户端ID
     */
    @TableField(value = "client_id")
    private String clientId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 用户名
     */
    @TableField(value = "username")
    private String username;

}